package com.code.monitor.utils;

import java.util.Random;

public class UUIDUtils {
    private static Integer randomLen = 8;
    private static char[] array = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();

    public static String uploadId() {
        StringBuffer stringBuffer = new StringBuffer(DateUtils.getYMDDate() + "-");

        Random random = new Random();
        for (int i = 0; i < randomLen; i++) {
            stringBuffer.append(array[random.nextInt(array.length)]);
        }
        return stringBuffer.toString();
    }
}
